package com.green.dao.manage.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.green.dao.impl.BaseDaoImpl;
import com.green.dao.manage.AreaDao;
import com.green.model.manage.Area;



/**
 * 地址基础数据
 * 
 */
@Repository("areaDao")
public class AreaDaoImpl extends BaseDaoImpl implements AreaDao {

	@Override
	public int insertArea(Area ct) {
		return insert("com.green.dao.manage.AreaDao.insertArea", ct);
	}

	@Override
	public int updateArea(Area ct) {
		return update("com.green.dao.manage.AreaDao.updateArea", ct);
	}

	@Override
	public int deleteArea(Map<String, Object> param) {
		return delete("com.green.dao.manage.AreaDao.deleteArea", param);
	}

	@Override
	public Area getAreaById(String id) {
		return (Area) super.getSqlSession().selectOne("com.green.dao.manage.AreaDao.getAreaById",id);	
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Area> getAreaList(Map<String, Object> param) {
		return (List<Area>) selectList("com.green.dao.manage.AreaDao.getAreaList", param);
	}
	
	
}
